"""
接口相应格式封装
"""


def success(msg: str, data: any = None, code=200):
    return {"code": code, "msg": msg, "data": data}


def fail(msg: str, data: any = None, code=500):
    return {"code": code, "msg": msg, "data": data}
